<?php
    require('./Utils.php');

    $post = getJsonParamter();

    $id = $post['id'];
    $image = $post['image'];

    $conn = getConnection();
    $sql = "UPDATE carousel SET image = ? WHERE id = ?";

    $result = execute($conn, $sql, $image , $id);

    if($result) getJson(200, '修改成功', null);
        
    else getJson(500, '修改失败', null);
?>